.class Lcom/baidu/bn;
.super Lcom/baidu/l;


# instance fields
.field private k:Landroid/widget/LinearLayout;

.field private l:Lcom/baidu/aw;

.field private m:Lcom/baidu/aw;

.field private n:Landroid/widget/ImageView;

.field private o:Landroid/widget/ImageView;

.field private p:Landroid/graphics/drawable/BitmapDrawable;

.field private q:F

.field private r:I

.field private s:I

.field private t:I

.field private u:I


# direct methods
.method public constructor <init>(Lcom/baidu/AdView;)V
    .locals 3

    const/4 v2, 0x1

    invoke-direct {p0, p1}, Lcom/baidu/l;-><init>(Lcom/baidu/AdView;)V

    const v0, -0xaaaaab

    iput v0, p0, Lcom/baidu/bn;->r:I

    const/4 v0, -0x1

    iput v0, p0, Lcom/baidu/bn;->s:I

    const/16 v0, 0xff

    iput v0, p0, Lcom/baidu/bn;->t:I

    const-string v0, "TextAdContainer"

    const-string v1, "{"

    invoke-static {v0, v1}, Lcom/baidu/bk;->b(Ljava/lang/String;Ljava/lang/String;)I

    invoke-virtual {p0, v2}, Lcom/baidu/bn;->setFocusable(Z)V

    invoke-virtual {p0, v2}, Lcom/baidu/bn;->setClickable(Z)V

    new-instance v0, Landroid/widget/ImageView;

    invoke-virtual {p0}, Lcom/baidu/bn;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/baidu/bn;->n:Landroid/widget/ImageView;

    new-instance v0, Landroid/widget/ImageView;

    invoke-virtual {p0}, Lcom/baidu/bn;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/baidu/bn;->o:Landroid/widget/ImageView;

    new-instance v0, Lcom/baidu/aw;

    invoke-virtual {p0}, Lcom/baidu/bn;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Lcom/baidu/aw;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/baidu/bn;->l:Lcom/baidu/aw;

    new-instance v0, Lcom/baidu/aw;

    invoke-virtual {p0}, Lcom/baidu/bn;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Lcom/baidu/aw;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/baidu/bn;->m:Lcom/baidu/aw;

    iget-object v0, p0, Lcom/baidu/bn;->n:Landroid/widget/ImageView;

    sget-object v1, Landroid/widget/ImageView$ScaleType;->FIT_XY:Landroid/widget/ImageView$ScaleType;

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    iget-object v0, p0, Lcom/baidu/bn;->o:Landroid/widget/ImageView;

    sget-object v1, Landroid/widget/ImageView$ScaleType;->FIT_XY:Landroid/widget/ImageView$ScaleType;

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    const-string v0, "TextAdContainer"

    const-string v1, "}"

    invoke-static {v0, v1}, Lcom/baidu/bk;->b(Ljava/lang/String;Ljava/lang/String;)I

    return-void
.end method

.method private a(Landroid/graphics/Rect;III)Landroid/graphics/drawable/BitmapDrawable;
    .locals 9

    const/4 v5, 0x2

    const/4 v4, 0x0

    const/4 v3, 0x1

    const-string v0, "TextAdContainer.refreshBackgroundDrawable tc:%X bc:%X bt:%d"

    const/4 v1, 0x3

    new-array v1, v1, [Ljava/lang/Object;

    invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    aput-object v2, v1, v4

    invoke-static {p3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    aput-object v2, v1, v3

    invoke-static {p4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    aput-object v2, v1, v5

    invoke-static {v0, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/baidu/bk;->b(Ljava/lang/String;)I

    :try_start_0
    invoke-virtual {p1}, Landroid/graphics/Rect;->width()I

    move-result v0

    invoke-virtual {p1}, Landroid/graphics/Rect;->height()I

    move-result v1

    sget-object v2, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    invoke-static {v0, v1, v2}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object v0

    new-instance v1, Landroid/graphics/Canvas;

    invoke-direct {v1, v0}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V

    new-instance v2, Landroid/graphics/Paint;

    invoke-direct {v2}, Landroid/graphics/Paint;-><init>()V

    invoke-static {p2}, Landroid/graphics/Color;->red(I)I

    move-result v3

    invoke-static {p2}, Landroid/graphics/Color;->green(I)I

    move-result v4

    invoke-static {p2}, Landroid/graphics/Color;->blue(I)I

    move-result v5

    invoke-static {p4, v3, v4, v5}, Landroid/graphics/Color;->argb(IIII)I

    move-result v3

    invoke-virtual {v2, v3}, Landroid/graphics/Paint;->setColor(I)V

    const/4 v3, 0x1

    invoke-virtual {v2, v3}, Landroid/graphics/Paint;->setAntiAlias(Z)V

    invoke-virtual {v1, p1, v2}, Landroid/graphics/Canvas;->drawRect(Landroid/graphics/Rect;Landroid/graphics/Paint;)V

    div-int/lit8 v2, p4, 0x2

    invoke-static {p3}, Landroid/graphics/Color;->red(I)I

    move-result v3

    invoke-static {p3}, Landroid/graphics/Color;->green(I)I

    move-result v4

    invoke-static {p3}, Landroid/graphics/Color;->blue(I)I

    move-result v5

    invoke-static {v2, v3, v4, v5}, Landroid/graphics/Color;->argb(IIII)I

    move-result v2

    invoke-static {p3}, Landroid/graphics/Color;->red(I)I

    move-result v3

    invoke-static {p3}, Landroid/graphics/Color;->green(I)I

    move-result v4

    invoke-static {p3}, Landroid/graphics/Color;->blue(I)I

    move-result v5

    invoke-static {p4, v3, v4, v5}, Landroid/graphics/Color;->argb(IIII)I

    move-result v3

    new-instance v4, Landroid/graphics/drawable/GradientDrawable;

    sget-object v5, Landroid/graphics/drawable/GradientDrawable$Orientation;->TOP_BOTTOM:Landroid/graphics/drawable/GradientDrawable$Orientation;

    const/4 v6, 0x2

    new-array v6, v6, [I

    const/4 v7, 0x0

    aput v2, v6, v7

    const/4 v2, 0x1

    aput v3, v6, v2

    invoke-direct {v4, v5, v6}, Landroid/graphics/drawable/GradientDrawable;-><init>(Landroid/graphics/drawable/GradientDrawable$Orientation;[I)V

    invoke-virtual {p1}, Landroid/graphics/Rect;->height()I

    move-result v2

    int-to-double v5, v2

    const-wide/high16 v7, 0x3fe0

    mul-double/2addr v5, v7

    double-to-int v2, v5

    iget v5, p1, Landroid/graphics/Rect;->top:I

    add-int/2addr v2, v5

    iget v5, p1, Landroid/graphics/Rect;->left:I

    iget v6, p1, Landroid/graphics/Rect;->top:I

    iget v7, p1, Landroid/graphics/Rect;->right:I

    invoke-virtual {v4, v5, v6, v7, v2}, Landroid/graphics/drawable/GradientDrawable;->setBounds(IIII)V

    invoke-virtual {v4, v1}, Landroid/graphics/drawable/GradientDrawable;->draw(Landroid/graphics/Canvas;)V

    new-instance v4, Landroid/graphics/Paint;

    invoke-direct {v4}, Landroid/graphics/Paint;-><init>()V

    invoke-virtual {v4, v3}, Landroid/graphics/Paint;->setColor(I)V

    new-instance v3, Landroid/graphics/Rect;

    iget v5, p1, Landroid/graphics/Rect;->left:I

    iget v6, p1, Landroid/graphics/Rect;->right:I

    iget v7, p1, Landroid/graphics/Rect;->bottom:I

    invoke-direct {v3, v5, v2, v6, v7}, Landroid/graphics/Rect;-><init>(IIII)V

    invoke-virtual {v1, v3, v4}, Landroid/graphics/Canvas;->drawRect(Landroid/graphics/Rect;Landroid/graphics/Paint;)V

    new-instance v1, Landroid/graphics/drawable/BitmapDrawable;

    invoke-direct {v1, v0}, Landroid/graphics/drawable/BitmapDrawable;-><init>(Landroid/graphics/Bitmap;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-object v0, v1

    :goto_0
    return-object v0

    :catch_0
    move-exception v0

    invoke-static {v0}, Lcom/baidu/bk;->a(Ljava/lang/Throwable;)I

    const/4 v0, 0x0

    goto :goto_0
.end method

.method private m()V
    .locals 4

    const/4 v3, 0x0

    new-instance v0, Landroid/graphics/Rect;

    iget v1, p0, Lcom/baidu/bn;->g:I

    iget v2, p0, Lcom/baidu/bn;->h:I

    invoke-direct {v0, v3, v3, v1, v2}, Landroid/graphics/Rect;-><init>(IIII)V

    iget v1, p0, Lcom/baidu/bn;->s:I

    iget v2, p0, Lcom/baidu/bn;->r:I

    iget v3, p0, Lcom/baidu/bn;->t:I

    invoke-direct {p0, v0, v1, v2, v3}, Lcom/baidu/bn;->a(Landroid/graphics/Rect;III)Landroid/graphics/drawable/BitmapDrawable;

    move-result-object v0

    iput-object v0, p0, Lcom/baidu/bn;->p:Landroid/graphics/drawable/BitmapDrawable;

    iget-object v0, p0, Lcom/baidu/bn;->p:Landroid/graphics/drawable/BitmapDrawable;

    invoke-virtual {p0, v0}, Lcom/baidu/bn;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    return-void
.end method


# virtual methods
.method public a(I)V
    .locals 5

    iget v0, p0, Lcom/baidu/bn;->s:I

    if-eq v0, p1, :cond_3

    const/4 v0, 0x1

    :goto_0
    iget v1, p0, Lcom/baidu/bn;->t:I

    invoke-static {p1}, Landroid/graphics/Color;->red(I)I

    move-result v2

    invoke-static {p1}, Landroid/graphics/Color;->green(I)I

    move-result v3

    invoke-static {p1}, Landroid/graphics/Color;->blue(I)I

    move-result v4

    invoke-static {v1, v2, v3, v4}, Landroid/graphics/Color;->argb(IIII)I

    move-result v1

    iput v1, p0, Lcom/baidu/bn;->s:I

    iget-object v1, p0, Lcom/baidu/bn;->l:Lcom/baidu/aw;

    if-eqz v1, :cond_0

    iget-object v1, p0, Lcom/baidu/bn;->l:Lcom/baidu/aw;

    iget v2, p0, Lcom/baidu/bn;->s:I

    invoke-virtual {v1, v2}, Lcom/baidu/aw;->setTextColor(I)V

    :cond_0
    iget-object v1, p0, Lcom/baidu/bn;->m:Lcom/baidu/aw;

    if-eqz v1, :cond_1

    iget-object v1, p0, Lcom/baidu/bn;->m:Lcom/baidu/aw;

    iget v2, p0, Lcom/baidu/bn;->s:I

    invoke-virtual {v1, v2}, Lcom/baidu/aw;->setTextColor(I)V

    :cond_1
    if-eqz v0, :cond_2

    invoke-direct {p0}, Lcom/baidu/bn;->m()V

    :cond_2
    return-void

    :cond_3
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public a(Lcom/baidu/Ad;Lcom/baidu/t;ILcom/baidu/ag;)V
    .locals 6

    const/4 v5, -0x1

    const/4 v4, 0x0

    const-string v0, "TextAdContainer"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, "setAd "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/baidu/bk;->b(Ljava/lang/String;Ljava/lang/String;)I

    iget v0, p4, Lcom/baidu/ag;->a:I

    iput v0, p0, Lcom/baidu/bn;->g:I

    iget v0, p4, Lcom/baidu/ag;->b:I

    iput v0, p0, Lcom/baidu/bn;->h:I

    const-wide v0, 0x3fbaaaaaa0000000L

    iget v2, p0, Lcom/baidu/bn;->h:I

    int-to-double v2, v2

    mul-double/2addr v0, v2

    double-to-int v0, v0

    iput v0, p0, Lcom/baidu/bn;->c:I

    invoke-virtual {p0}, Lcom/baidu/bn;->l()V

    if-eqz p1, :cond_0

    invoke-virtual {p1}, Lcom/baidu/Ad;->c()Landroid/graphics/Bitmap;

    move-result-object v0

    if-nez v0, :cond_1

    :cond_0
    new-instance v0, Ljava/lang/IllegalArgumentException;

    invoke-direct {v0}, Ljava/lang/IllegalArgumentException;-><init>()V

    throw v0

    :cond_1
    iput-object p1, p0, Lcom/baidu/bn;->b:Lcom/baidu/Ad;

    iput-boolean v4, p0, Lcom/baidu/bn;->d:Z

    invoke-virtual {p1}, Lcom/baidu/Ad;->i()I

    move-result v0

    const/4 v1, 0x1

    if-ne v0, v1, :cond_2

    invoke-virtual {p1}, Lcom/baidu/Ad;->k()I

    move-result v0

    invoke-virtual {p0, v0}, Lcom/baidu/bn;->a(I)V

    invoke-virtual {p1}, Lcom/baidu/Ad;->l()I

    move-result v0

    iput v0, p0, Lcom/baidu/bn;->t:I

    invoke-virtual {p1}, Lcom/baidu/Ad;->j()I

    move-result v0

    iput v0, p0, Lcom/baidu/bn;->r:I

    :cond_2
    iget-object v0, p0, Lcom/baidu/bn;->l:Lcom/baidu/aw;

    invoke-virtual {p1}, Lcom/baidu/Ad;->getTitle()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/baidu/aw;->a(Ljava/lang/String;)V

    iget-object v0, p0, Lcom/baidu/bn;->l:Lcom/baidu/aw;

    invoke-virtual {v0}, Lcom/baidu/aw;->a()V

    iget-object v0, p0, Lcom/baidu/bn;->m:Lcom/baidu/aw;

    invoke-virtual {p1}, Lcom/baidu/Ad;->getDescription()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/baidu/aw;->a(Ljava/lang/String;)V

    iget-object v0, p0, Lcom/baidu/bn;->m:Lcom/baidu/aw;

    invoke-virtual {v0}, Lcom/baidu/aw;->a()V

    const-string v0, ""

    invoke-virtual {p1}, Lcom/baidu/Ad;->getTitle()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_3

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "empty title "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/baidu/bk;->b(Ljava/lang/String;)I

    iget-object v0, p0, Lcom/baidu/bn;->l:Lcom/baidu/aw;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Lcom/baidu/aw;->setVisibility(I)V

    new-instance v0, Landroid/widget/LinearLayout$LayoutParams;

    invoke-direct {v0, v5, v5}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    iget v1, p0, Lcom/baidu/bn;->h:I

    iget v2, p0, Lcom/baidu/bn;->c:I

    mul-int/lit8 v2, v2, 0x3

    sub-int/2addr v1, v2

    int-to-float v1, v1

    iget v2, p0, Lcom/baidu/bn;->q:F

    sub-float/2addr v1, v2

    const/high16 v2, 0x4000

    div-float/2addr v1, v2

    float-to-int v1, v1

    invoke-virtual {v0, v4, v1, v4, v4}, Landroid/widget/LinearLayout$LayoutParams;->setMargins(IIII)V

    iget-object v1, p0, Lcom/baidu/bn;->m:Lcom/baidu/aw;

    invoke-virtual {v1, v0}, Lcom/baidu/aw;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    :goto_0
    iget-object v0, p0, Lcom/baidu/bn;->n:Landroid/widget/ImageView;

    invoke-virtual {p1}, Lcom/baidu/Ad;->d()Landroid/graphics/Bitmap;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    iget-object v0, p0, Lcom/baidu/bn;->o:Landroid/widget/ImageView;

    invoke-virtual {p1}, Lcom/baidu/Ad;->f()Landroid/graphics/Bitmap;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    iget-object v0, p0, Lcom/baidu/bn;->e:Landroid/widget/ImageView;

    invoke-virtual {p1}, Lcom/baidu/Ad;->e()Landroid/graphics/Bitmap;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    iget-object v0, p0, Lcom/baidu/bn;->f:Landroid/widget/ImageView;

    invoke-virtual {p1}, Lcom/baidu/Ad;->g()Landroid/graphics/Bitmap;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    iget-object v0, p0, Lcom/baidu/bn;->k:Landroid/widget/LinearLayout;

    invoke-virtual {v0}, Landroid/widget/LinearLayout;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v0

    check-cast v0, Landroid/widget/RelativeLayout$LayoutParams;

    invoke-virtual {p1}, Lcom/baidu/Ad;->n()Lcom/baidu/bj;

    move-result-object v1

    sget-object v2, Lcom/baidu/bj;->d:Lcom/baidu/bj;

    if-ne v1, v2, :cond_4

    iget v1, p0, Lcom/baidu/bn;->c:I

    :goto_1
    iget v2, p0, Lcom/baidu/bn;->c:I

    iget v3, p0, Lcom/baidu/bn;->h:I

    iget v4, p0, Lcom/baidu/bn;->u:I

    add-int/2addr v3, v4

    iget v4, p0, Lcom/baidu/bn;->c:I

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/widget/RelativeLayout$LayoutParams;->setMargins(IIII)V

    iget-object v1, p0, Lcom/baidu/bn;->k:Landroid/widget/LinearLayout;

    invoke-virtual {v1, v0}, Landroid/widget/LinearLayout;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    invoke-super {p0, p1, p2, p3, p4}, Lcom/baidu/l;->a(Lcom/baidu/Ad;Lcom/baidu/t;ILcom/baidu/ag;)V

    return-void

    :cond_3
    iget-object v0, p0, Lcom/baidu/bn;->l:Lcom/baidu/aw;

    invoke-virtual {v0, v4}, Lcom/baidu/aw;->setVisibility(I)V

    new-instance v0, Landroid/widget/LinearLayout$LayoutParams;

    invoke-direct {v0, v5, v5}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v0, v4, v4, v4, v4}, Landroid/widget/LinearLayout$LayoutParams;->setMargins(IIII)V

    iget-object v1, p0, Lcom/baidu/bn;->m:Lcom/baidu/aw;

    invoke-virtual {v1, v0}, Lcom/baidu/aw;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    goto :goto_0

    :cond_4
    iget v1, p0, Lcom/baidu/bn;->h:I

    goto :goto_1
.end method

.method public b(I)V
    .locals 6

    iget v0, p0, Lcom/baidu/bn;->t:I

    if-eq v0, p1, :cond_1

    const/4 v0, 0x1

    :goto_0
    iput p1, p0, Lcom/baidu/bn;->t:I

    iget-object v1, p0, Lcom/baidu/bn;->n:Landroid/widget/ImageView;

    iget v2, p0, Lcom/baidu/bn;->t:I

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setAlpha(I)V

    iget-object v1, p0, Lcom/baidu/bn;->o:Landroid/widget/ImageView;

    iget v2, p0, Lcom/baidu/bn;->t:I

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setAlpha(I)V

    iget-object v1, p0, Lcom/baidu/bn;->e:Landroid/widget/ImageView;

    iget v2, p0, Lcom/baidu/bn;->t:I

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setAlpha(I)V

    iget-object v1, p0, Lcom/baidu/bn;->f:Landroid/widget/ImageView;

    iget v2, p0, Lcom/baidu/bn;->t:I

    int-to-double v2, v2

    const-wide/high16 v4, 0x3ff0

    mul-double/2addr v2, v4

    double-to-int v2, v2

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setAlpha(I)V

    iget v1, p0, Lcom/baidu/bn;->s:I

    invoke-virtual {p0, v1}, Lcom/baidu/bn;->a(I)V

    if-eqz v0, :cond_0

    invoke-direct {p0}, Lcom/baidu/bn;->m()V

    :cond_0
    return-void

    :cond_1
    const/4 v0, 0x0

    goto :goto_0
.end method

.method protected l()V
    .locals 10

    const/16 v9, 0xa

    const/4 v8, -0x2

    const/16 v7, 0xb

    const/4 v6, -0x1

    invoke-virtual {p0}, Lcom/baidu/bn;->i()Z

    move-result v0

    if-eqz v0, :cond_0

    :goto_0
    return-void

    :cond_0
    invoke-virtual {p0}, Lcom/baidu/bn;->j()V

    iget v0, p0, Lcom/baidu/bn;->h:I

    iget v1, p0, Lcom/baidu/bn;->c:I

    mul-int/lit8 v1, v1, 0x2

    sub-int/2addr v0, v1

    new-instance v1, Landroid/widget/RelativeLayout$LayoutParams;

    invoke-direct {v1, v0, v0}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    const/16 v2, 0x9

    invoke-virtual {v1, v2}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    iget v2, p0, Lcom/baidu/bn;->c:I

    iget v3, p0, Lcom/baidu/bn;->c:I

    iget v4, p0, Lcom/baidu/bn;->c:I

    iget v5, p0, Lcom/baidu/bn;->c:I

    invoke-virtual {v1, v2, v3, v4, v5}, Landroid/widget/RelativeLayout$LayoutParams;->setMargins(IIII)V

    iget-object v2, p0, Lcom/baidu/bn;->n:Landroid/widget/ImageView;

    invoke-virtual {v2, v1}, Landroid/widget/ImageView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v1, p0, Lcom/baidu/bn;->n:Landroid/widget/ImageView;

    invoke-virtual {p0, v1}, Lcom/baidu/bn;->addView(Landroid/view/View;)V

    const-wide/high16 v1, 0x4000

    iget v3, p0, Lcom/baidu/bn;->h:I

    int-to-double v3, v3

    mul-double/2addr v1, v3

    const-wide/high16 v3, 0x4048

    div-double/2addr v1, v3

    double-to-int v1, v1

    iput v1, p0, Lcom/baidu/bn;->u:I

    new-instance v1, Landroid/widget/RelativeLayout$LayoutParams;

    iget v2, p0, Lcom/baidu/bn;->h:I

    iget v3, p0, Lcom/baidu/bn;->u:I

    add-int/2addr v2, v3

    iget v3, p0, Lcom/baidu/bn;->h:I

    invoke-direct {v1, v2, v3}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v1, v7}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    invoke-virtual {v1, v9}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    iget-object v2, p0, Lcom/baidu/bn;->o:Landroid/widget/ImageView;

    invoke-virtual {v2, v1}, Landroid/widget/ImageView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v1, p0, Lcom/baidu/bn;->o:Landroid/widget/ImageView;

    invoke-virtual {p0, v1}, Lcom/baidu/bn;->addView(Landroid/view/View;)V

    new-instance v1, Landroid/widget/RelativeLayout$LayoutParams;

    iget v2, p0, Lcom/baidu/bn;->h:I

    iget v3, p0, Lcom/baidu/bn;->h:I

    invoke-direct {v1, v2, v3}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v1, v9}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    invoke-virtual {v1, v7}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    iget-object v2, p0, Lcom/baidu/bn;->e:Landroid/widget/ImageView;

    invoke-virtual {v2, v1}, Landroid/widget/ImageView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v1, p0, Lcom/baidu/bn;->e:Landroid/widget/ImageView;

    invoke-virtual {p0, v1}, Lcom/baidu/bn;->addView(Landroid/view/View;)V

    const-wide v1, 0x3fdaaaaaaaaaaaabL

    int-to-double v3, v0

    mul-double v0, v1, v3

    double-to-int v0, v0

    new-instance v1, Landroid/widget/RelativeLayout$LayoutParams;

    invoke-direct {v1, v0, v0}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v1, v7}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    const/16 v0, 0xc

    invoke-virtual {v1, v0}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    iget-object v0, p0, Lcom/baidu/bn;->f:Landroid/widget/ImageView;

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v0, p0, Lcom/baidu/bn;->f:Landroid/widget/ImageView;

    invoke-virtual {p0, v0}, Lcom/baidu/bn;->addView(Landroid/view/View;)V

    new-instance v0, Landroid/widget/LinearLayout;

    invoke-virtual {p0}, Lcom/baidu/bn;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/widget/LinearLayout;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/baidu/bn;->k:Landroid/widget/LinearLayout;

    new-instance v0, Landroid/widget/RelativeLayout$LayoutParams;

    invoke-direct {v0, v6, v6}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    iget v1, p0, Lcom/baidu/bn;->h:I

    iget v2, p0, Lcom/baidu/bn;->c:I

    iget v3, p0, Lcom/baidu/bn;->h:I

    iget v4, p0, Lcom/baidu/bn;->u:I

    add-int/2addr v3, v4

    iget v4, p0, Lcom/baidu/bn;->c:I

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/widget/RelativeLayout$LayoutParams;->setMargins(IIII)V

    iget-object v1, p0, Lcom/baidu/bn;->k:Landroid/widget/LinearLayout;

    invoke-virtual {v1, v0}, Landroid/widget/LinearLayout;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v0, p0, Lcom/baidu/bn;->k:Landroid/widget/LinearLayout;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setOrientation(I)V

    iget-object v0, p0, Lcom/baidu/bn;->k:Landroid/widget/LinearLayout;

    invoke-virtual {p0, v0}, Lcom/baidu/bn;->addView(Landroid/view/View;)V

    const v0, 0x3e8aaaab

    iget v1, p0, Lcom/baidu/bn;->h:I

    int-to-float v1, v1

    mul-float/2addr v0, v1

    iget-object v1, p0, Lcom/baidu/bn;->l:Lcom/baidu/aw;

    invoke-virtual {v1, v6}, Lcom/baidu/aw;->setTextColor(I)V

    iget-object v1, p0, Lcom/baidu/bn;->l:Lcom/baidu/aw;

    sget-object v2, Lcom/baidu/bn;->a:Landroid/graphics/Typeface;

    invoke-virtual {v1, v2}, Lcom/baidu/aw;->setTypeface(Landroid/graphics/Typeface;)V

    iget-object v1, p0, Lcom/baidu/bn;->l:Lcom/baidu/aw;

    invoke-virtual {v1, v0}, Lcom/baidu/aw;->setTextSize(F)V

    new-instance v0, Landroid/widget/LinearLayout$LayoutParams;

    invoke-direct {v0, v6, v8}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    iget-object v1, p0, Lcom/baidu/bn;->l:Lcom/baidu/aw;

    invoke-virtual {v1, v0}, Lcom/baidu/aw;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v0, p0, Lcom/baidu/bn;->k:Landroid/widget/LinearLayout;

    iget-object v1, p0, Lcom/baidu/bn;->l:Lcom/baidu/aw;

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    const v0, 0x3eaaaaab

    iget v1, p0, Lcom/baidu/bn;->h:I

    int-to-float v1, v1

    mul-float/2addr v0, v1

    iput v0, p0, Lcom/baidu/bn;->q:F

    iget-object v0, p0, Lcom/baidu/bn;->m:Lcom/baidu/aw;

    invoke-virtual {v0, v6}, Lcom/baidu/aw;->setTextColor(I)V

    iget-object v0, p0, Lcom/baidu/bn;->m:Lcom/baidu/aw;

    sget-object v1, Lcom/baidu/bn;->a:Landroid/graphics/Typeface;

    invoke-virtual {v0, v1}, Lcom/baidu/aw;->setTypeface(Landroid/graphics/Typeface;)V

    iget-object v0, p0, Lcom/baidu/bn;->m:Lcom/baidu/aw;

    iget v1, p0, Lcom/baidu/bn;->q:F

    invoke-virtual {v0, v1}, Lcom/baidu/aw;->setTextSize(F)V

    new-instance v0, Landroid/widget/LinearLayout$LayoutParams;

    invoke-direct {v0, v6, v8}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    iget-object v1, p0, Lcom/baidu/bn;->m:Lcom/baidu/aw;

    invoke-virtual {v1, v0}, Lcom/baidu/aw;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v0, p0, Lcom/baidu/bn;->k:Landroid/widget/LinearLayout;

    iget-object v1, p0, Lcom/baidu/bn;->m:Lcom/baidu/aw;

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    invoke-direct {p0}, Lcom/baidu/bn;->m()V

    goto/16 :goto_0
.end method

.method protected onDraw(Landroid/graphics/Canvas;)V
    .locals 0

    return-void
.end method

.method public setBackgroundColor(I)V
    .locals 2

    iget v0, p0, Lcom/baidu/bn;->r:I

    if-eq v0, p1, :cond_1

    const/4 v0, 0x1

    :goto_0
    const/high16 v1, -0x100

    or-int/2addr v1, p1

    iput v1, p0, Lcom/baidu/bn;->r:I

    if-eqz v0, :cond_0

    invoke-direct {p0}, Lcom/baidu/bn;->m()V

    :cond_0
    return-void

    :cond_1
    const/4 v0, 0x0

    goto :goto_0
.end method
